package com.lagou.pojo;

import javax.sql.DataSource;
import java.util.HashMap;
import java.util.Map;

public class Configuration {

    /**
     * 数据源
     */
    private DataSource dataSource;
    /**
     * mapping参数映射列表
     */
    private Map<String, MappedStatement> mappedStatements = new HashMap<>();
    /**
     * 是否开启二级缓存
     */
    private Boolean cacheEnabled = false;
    /**
     * 二级缓存
     */
    private Map<String, Map<String, Object>> statementCache;

    public DataSource getDataSource() {
        return dataSource;
    }

    public void setDataSource(DataSource dataSource) {
        this.dataSource = dataSource;
    }

    public Boolean getCacheEnabled() {
        return cacheEnabled;
    }

    public void setCacheEnabled(Boolean cacheEnabled) {
        this.cacheEnabled = cacheEnabled;
    }

    public Map<String, MappedStatement> getMappedStatements() {
        return mappedStatements;
    }

    public void setMappedStatements(Map<String, MappedStatement> mappedStatements) {
        this.mappedStatements = mappedStatements;
    }

    public Map<String, Map<String, Object>> getStatementCache() {
        return statementCache;
    }

    public void setStatementCache(Map<String, Map<String, Object>> statementCache) {
        this.statementCache = statementCache;
    }
}
